home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 8484 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  3.0 KB

  1. Path: soap.news.pipex.net!pipex!usenet
  2. From: Dirk Wessels <ge68@dial.pipex.com>
  3. Newsgroups: comp.object,comp.software-eng,comp.lang.c++
  4. Subject: Re: Moving from C to C++
  5. Date: 19 Feb 1996 10:35:08 GMT
  6. Organization: UnipalmPIPEX server (post doesn't reflect views of UnipalmPIPEX)
  7. Message-ID: <4g9jos$7cl@soap.news.pipex.net>
  8. References: <4fak3f$3op@news4.digex.net> <1996Feb9.233739.24043@amc.com> <4g8ctn$7do@news4.digex.net>
  9. NNTP-Posting-Host: aj114.du.pipex.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 1.1 (Windows; I; 16bit)
  14.  
  15. Hello,
  16.  
  17. I did some OO programming in C and Pascal, later in C++, Delphi and 
  18. Smalltalk.
  19.  
  20. I implemented inheritance in C by making a function-table for each class 
  21. and calling the functions indirectly.
  22. While I wanted to use C++ needed to use this because:
  23. 1. The system should be compatible with almost any other platform.
  24.     Only GNU-C++ was fully compatible accross platforms,
  25.     but was not available for all versions of Unix.
  26. 2. The program should be readable by other programmers.
  27.     Most other programmers only knew C.
  28. 3. The other parts of the system were build in C and Fortran.
  29.     If you are adding C++ as well to the language-set it gets
  30.     very hard to fit them together.
  31. 4. The program should be able to compile for quite a few years.
  32.     The C++ standard was changing and still is.
  33.  
  34. It was rather cumbersome to define the function-tables each time again,
  35. but the program satisfied most of the requirements.
  36. The problem was that because of inheritance the program was hard
  37. to understand for other programmers, but any OOPL would have given
  38. this problem. Except that C is already quite hard to read.
  39.  
  40.  
  41. ell@access4.digex.net (Ell) wrote:
  42. >Curtis Green (curtis@amc.com) wrote:
  43. >: Ell (ell@access1.digex.net) wrote:
  44. >::Steven Hampson (steveh@jtec.com.au) wrote:
  45. >::: Perhaps there should be a distinction between the methodology and the tool
  46. >::: used to achieve that methodology.  There is a general shift to the ADT, OOT
  47. >::: methodolgy, but this does not imply that there has to be a shift from C to 
  48. >::: C++.
  49. >::: The best tool for the job is surely the tool that allows the job to be
  50. >::: done best.
  51. >::: This can be C, C++, Ada, Smalltalk, Assembler - whatever.  Languauges 
  52. >::: should be
  53. >::: chosen to fit the task at hand, not the other way round.
  54. >: : Yeauh, but most find it cumbersome and a lot of work implementing 
  55. >: : polymorphism using C.
  56. >: Thats what steve said.  If it is cumbersome and a lot of work implementing
  57. >: polymorphism in C, then find a language that makes it easier.  C++ was
  58. >: developed to do just that, if going to OO ideas with a pile of C code
  59. >: that needs to be reused.  If not, one of the other OO languages might
  60. >: make more sense.
  61. >
  62. >He also said that going to OOT does not imply there has to be a shift from
  63. >C to C++.  He also mentioned possibly using assmbler for oot.  While oot
  64. >is possible using C, or assembler in general why do oot without using an
  65. >oopl? 
  66. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  67. May this question be answered.
  68.  
  69. >
  70. >Elliott
  71.  
  72.  
  73.  
  74.